package com.example.educationalsystem.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.time.LocalDate;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;

import com.example.educationalsystem.common.util.LocalDateConverter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 
 * </p>
 *
 * @author zpc
 * @since 2022-12-02
 */
@ColumnWidth(30)//注释在具体属性上,设置单独列。注释在类上,统一设置列宽
@HeadRowHeight(30)//设置表头行高
@ContentRowHeight(20)//统一设置数据行行高
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("teacher")
@ApiModel(value="Teacher对象", description="")
public class Teacher extends Model<Teacher> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "教师编号:0001")
    @ExcelProperty(value = "教师编号")
    @TableId("teacher_id")
    private String teacherId;

    @ApiModelProperty(value = "教师姓名:李四")
    @ExcelProperty(value = "教师姓名")
    @TableField("teacher_name")
    private String teacherName;

    @ApiModelProperty(value = "教师性别:男")
    @ExcelProperty(value = "教师性别")
    @TableField("teacher_sex")
    private String teacherSex;

    @ApiModelProperty(value = "教师出生日期:1996-11-03")
    @ExcelProperty(value = "教师出生日期",converter = LocalDateConverter.class)
    @TableField("teacher_birthday")
    private LocalDate teacherBirthday;

    @ApiModelProperty(value = "教师电话:15354929843")
    @ExcelProperty(value = "教师电话")
    @TableField("teacher_phone")
    private String teacherPhone;


    @Override
    protected Serializable pkVal() {
        return this.teacherId;
    }

}
